﻿using System;
using BookStores.DTO;
using System.Threading.Tasks;
using BookStores.DTO.Request;
using System.Collections.Generic;

namespace BookStores.IDomain
{
    /// <summary>
    /// 
    /// </summary>
    public interface IBooks : Shared.Contracts.IDependency
    {
        /// <summary>
        /// 根据ID 获取图书信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<BookInfo> GetBookInfo(string id);

        /// <summary>
        /// 保存图书相关信息
        /// </summary>
        /// <param name="bookInfo"></param>
        /// <returns>
        /// bool: 保存结果
        /// string: Book.ID
        /// </returns>
        Task<(bool,string)> Save(BookInfo bookInfo);
        /// <summary>
        /// 根据参数查询数据
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<(List<DTO.Response.BookInfo>, int)> Query(BookQueryParam param);
        /// <summary>
        /// 删除图书
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> Delete(string id);
    }
}
